package v1

import "github.com/gogf/gf/v2/frame/g"

type UserLoginReq struct {
	g.Meta   `path:"/user/login" tags:"user" method:"post" summary:"登录"`
	Username string `json:"username" v:"required#用户名不能为空"`
	Password string `json:"password" v:"required#密码不能为空"`
}

type UserLoginRes struct {
	Token string `json:"token"`
}

type UserInfoReq struct {
	g.Meta `path:"/user/info" tags:"user" method:"get" summary:"用户信息"`
	Token  string `json:"token" v:"required#token不能为空"`
}

type UserInfoRes struct {
	Roles        []string `json:"roles"`
	Introduction string   `json:"introduction"`
	Avatar       string   `json:"avatar"`
	Name         string   `json:"name"`
}
